home *** CD-ROM | disk | FTP | other *** search
- Path: neurodne.demon.co.uk!not-for-mail
- From: jon@neurodne.demon.co.uk (Jon Raymond)
- Newsgroups: comp.sys.amiga.misc,demon.tech.amiga
- Subject: Re: MIDI + C + AMIGA ??
- Followup-To: comp.sys.amiga.misc,demon.tech.amiga
- Date: 3 Feb 1996 19:30:11 -0000
- Organization: Jon's Linux Box.
- Message-ID: <4f0d43$15j@neurodne.demon.co.uk>
- References: <4eh6en$7i1@bright.ecs.soton.ac.uk>
- X-NNTP-Posting-Host: neurodne.demon.co.uk
- X-Newsreader: TIN [version 1.2 PL2]
-
- Andrew Smith (ars94r@ecs.soton.ac.uk) wrote:
-
- : Hi, I'm trying to get a start writing MIDI programs for my amiga 500, and
- : was wondering if anyone has written (or knows of anyone who has written)
- : code to implement calling midi events from C. I have heard of Bill Bartons
- : midi library but can't get that to work with SAS/Lattice C (don't know
- : why!). I'm prepared to switch compiler if it means getting access to a
- : ready made set of routines. If anyone knows what packages etc. are needed
- : (either commercial or on the net) then I'd be glad to hear from you!!
-
- I wrote a software program for my A-Level many moons ago to turn my miggy
- 500 into a drum machine. It could load samples into memory and play them in
- response to incoming MIDI messages. I wrote it in assembler, but writing it
- in C now should be no problem. All you need to do it use the serial device
- and read the incoming messages. MIDI note-on and off messages come in a
- sequence of 3 bytes, as follows,
-
-
- 1 0 0 1 x x x x ;1001=note on (1000 for note off):
- xxxx is channel 0-15 (1-16)
- 0 x x x x x x x ;0=always 0: note value 0-127
- 0 x x x x x x x ;0=always 0: velocity value 0-127
-
- All above at 31.250Kbaud, 1 start and 1 stop bit.
-
-
- Thats it! As you can see, the MSB can be used to tell if you are out of sync
- so you shouldn't have any problems.
-
- If you want more info get the book Advanced MIDI users guide by R.A Penfold.
- ISBN 1-870775-18-x. It costs about a tenner and is published by PC
- Publishing (I got mine from Maplin).
-
-
- : Cheers,
-
- : Andy.
-
- --
-
- Email jon@neurodne.demon.co.uk Microsoft?: Permission denied
-